package com.sky.blog.dao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.blog.dao.pojo.UserNotice;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author sky  2022/3/27
 * @version 1.0
 */
@Repository
public interface UserNoticeMapper extends BaseMapper<UserNotice> {
    /**
     * 查询博客的所有通知<br>
     * <ol>
     *     <li>按sort升序查询</li>
     *     <li>按创建通知时间降序查询</li>
     * </ol>
     *
     * @param blogUserId 博主ID
     * @param status     通知主体状态
     * @return 所有通知
     */
    List<String> selectUserNoticesByUserId(@Param("userId") Long blogUserId,
                                           @Param("status") int status);
}
